import pika

connection = pika.BlockingConnection(pika.ConnectionParameters('81.71.137.167'))
channel = connection.channel()

channel.exchange_declare(exchange='m1', exchange_type='fanout')

channel.basic_publish(exchange='m1',
                      routing_key='',
                      body='msg4')

connection.close()